﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StructureMap.Configuration.DSL;
using Core.IRepository;
using Library.Structuremap;
using System.Configuration;
using Repositories;
using System.Data.Entity;
using StructureMap;
using StructureMap.Web.Pipeline;
using StructureMap.Pipeline;

namespace Assembler
{
    public class RepositoryRegistry : Registry
    {
        public RepositoryRegistry(ILifecycle dbContextLifecycle)
        {
            For<DbContext>().LifecycleIs(dbContextLifecycle).Use<InsuranceEntities>();

            For<IUnitOfWork>().Use<UnitOfWork>();           
            For<IColumnRepository>().Use<ColumnRepository>();
            For<IItemValueRepository>().Use<ItemValueRepository>(); 
            For<IItemRepository>().Use<ItemRepository>();
            For<IArticleRepository>().Use<ArticleRepository>();
        }
    }
}
